package com.example.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.example.service.MailService;

@Controller
public class SendEmailController {
	@Autowired
	public MailService mailService;

	@RequestMapping("/sendEmail")
	public @ResponseBody String sendEmail() {
		String to = "623383824@qq.com";
		String msg = "你好";
		String subject = "测试主题";
		mailService.sendMail(to, subject, msg);
		return "success";
	}

}